<template>
 <div>
    <h1>我的子组件 comp 含有4种插槽 {{ props.msg }}</h1>
    <Comp class="flex flex-col slot-content" title="">
      <p>默认插槽内容</p>
      <p>默认插入内容2</p>
      <template #header>
        <p>header slot content</p>
      </template>
      <template #body="{params}">
        <p>body slot content</p>
        <p>{{msg}}</p>
        <p>{{params}}</p>
      </template>
      <template #footer>
        <p>footer slot content</p>
      </template>
    </Comp>
  </div>
</template>

<script lang="ts" setup>
import Comp from './Comp.ts'
const props = defineProps({
  msg: {
    type: String,
    default: 'hello'
  }
})
</script>

<style lang="scss" scoped>
  .slot-content{
    p:nth-child(odd) {
     background-color: theme('colors.red.500');
    }
    p:nth-child(even) {
      @apply bg-green-500;
      @apply text-yellow-400;
      //background-color: theme('colors.green.500');
    }
  }
</style>